<template>
  <el-dialog
    v-model="dialogVisible"
    title="文件管理"
    @closed="closedDialog"
    width="30%"
    :close-on-click-modal="false"
  >
    <FileUpload :uploadMaxSize="100 * 1024 * 1024" />
    <template #footer>
      <el-button @click="closedDialog">取消</el-button>
    </template>
  </el-dialog>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import FileUpload from "@/components/Upload/FileUpload.vue";
/**
 * 文件上传弹窗
 */
defineOptions({
  name: "FileUploadDialog",
});

const props = defineProps({
  messageId: {
    type: Number,
    required: false,
  },
  closedDialog: {
    type: Function,
    required: true,
  },
});

const dialogVisible = ref<boolean>(true);
/** 关闭弹窗 */
const closedDialog = () => {
  props.closedDialog();
};
</script>

<style lang="scss" scoped></style>
